<?php
include_once('config/config.php');
include_once('library/class.php');
include_once('library/fpdf.php');

error_reporting(0);

function _autoloadClass($class)
{
    $path = realpath(dirname(__FILE__) . "/library/" . $class . ".php");
    include_once($path);
}
spl_autoload_register("_autoloadClass");


/* ========== Load Content ========== */
$uri = new Layout();
    $allowed_folder = unserialize(ALLOWED_FOLDER);
    $params = $uri->getParams();
    if(!empty($params)){
        if(in_array($params[0],$allowed_folder)){
            // Dynamic Load subfolder module
            $uri->render_dynamic_folder_subView();
        }else{
            // Default Module
            $uri->renderContent();
        }
    }else{
        // Default Module
        $uri->renderContent();
    }




